package com.itheima.mapper;

import com.itheima.pojo.Emp;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface EmpMapper {
    @Select("select * from emp e left join dept d on e.dept_id = d.id "+"where e.name like concat('%,#{name},%') and e.gender=#{gender} and e.entry_date between #{begin} and #{end}")
  List<Emp>    list(String name, Integer gender, LocalDate begin, LocalDate end);

    /**
     * 新增员工数据
     */










//    @Select("select count(*) from emp ")
//    Long findCount();
//
//    @Select("select * from emp e left join dept d on e.dept_id = d.id limit #{skip},#{pageSize} ")
//    List<Emp> findPage(Integer skip, Integer page);

}
